package org.a005;

public class T implements Runnable{
	public int count = 10;
	@Override
	public  void run() {
		//不加同步锁输出会有相同
//		synchronized (this) {
			count--;
			System.out.println(Thread.currentThread().getName()+" count="+count);
//		}
	}
	public static void main(String[] args) {
		T t = new T();
		for (int i = 0; i < 5; i++) {
			new Thread(t,"THREAD "+i).start();
		}
	}

}
